1. Field of the Invention
The present invention relates to an image sensing apparatus using image sensors such as CCDs or CMOS sensors, an image processing apparatus, a control method, and a computer-readable medium.
2. Description of the Related Art
In recent years, many image sensing apparatus are available on the market, such as digital cameras and digital video cameras that generate image signals with image sensors, such as CCDs, and record generated image signals as data. However, in digital cameras, foreign substances such as dust and dirt (hereinafter simply referred to as “dust”) may adhere to the image sensor, the surface of image-sensor cover glass or an optical filter, for example, that is fixed to the image sensor, or optical systems (hereinafter collectively referred to as “image-sensor optical components”). Such adherence of dust to image-sensor optical components causes the problem where the quality of shot images degrades, such as a case where light is blocked by dust, resulting in a portion that is not shot. Particularly, lens-exchangeable digital cameras have the problem whereby dust can easily enter the camera when lenses are exchanged.
Such dust on an image sensor usually adheres not to the surface of the image sensor but to the surface of the cover glass or an optical filter and, accordingly, images are formed in different states depending on the aperture value of the shooting lens and the distance from the pupil position. In other words, a lens at almost full aperture causes blurring and is thus little affected by adherence of minute dust, whereas a lens with a high aperture value, in contrast, forms clear images and is thus influenced by adherence of minute dust.
Thus, a method for obscuring dust is known in which an image that captures only dust on the image sensor is prepared in advance by, for example, shooting a white wall with a small lens aperture, and is used in combination with an ordinary shot image (see Japanese Patent Laid-Open No. 2004-222231). With this method, however, the user always needs to be aware of the association between the image that was shot for dust detection and related real shot images. A conceivable example is that dust positions are acquired by shooting a white wall, for example, and then held in the digital camera so that a list of dust positions and sizes are attached to image data that is obtained by ordinary shooting. For example, a separate image processing apparatus may be prepared and used to analyze dust positions in image data based on attached dust positions and to correct analyzed regions with surrounding pixels, thereby obscuring dust.
Another known method is analyzing multiple shot images and identifying unchanged minute regions as dust regions (see Japanese Patent Laid-Open No. 2005-72629).
Aside from the above-described dust problem, another problem also arises that, since image data obtained by a digital camera is easily displayed at different magnifications on computers, camera shake is getting more noticeable with year-over-year accelerating reductions in pixel pitches of image sensors. In conjunction with this, lens- or sensor-shift optical camera shake correction systems are becoming increasingly popular, but in cases where shooting is performed while applying optical camera shake correction, the optical axis will shift at every shooting. Thus, shot dust positions are not always constant. In addition, since the direction and speed of camera shake minutely vary during exposure, it is difficult to take into account the proper amount of optical axis shift even though the amount of camera shake is stored at the instant when the shutter is released, for example. The aforementioned conventional dust reduction processing accordingly does not include approaches to cases where the optical axis shifts during exposure and does not solve the problems satisfactorily.